#ifndef _VIDEO_PROC_ARR_H_
#define _VIDEO_PROC_ARR_H_
#include <stdint.h>
#include "video_proc_1ch.h"
#include <vector>
using namespace std;

class CVideoProc_Arr
{
public:
	CVideoProc_Arr();
	~CVideoProc_Arr();
public:
	int Init(int chNums);
	int InitParm(int ch ,int buf_sz);
	int start(int ch);
	int stop(int ch);
	int startTestFIFO();

	int read_frame(int ch , unsigned char * buf, int buf_sz,int clientID);
	int read_nalu(int ch , unsigned char* buf, int buf_sz);

	void GetVideoParm(int ch, fs_new_conf_t * fs_conf,encoder_new_conf_t * encoder_conf)
	{
		if(ch >= (int)m_vecVProc.size())
		{
			return ;
		}
		m_vecVProc[ch].GetVideoParm(fs_conf,encoder_conf);
	}

	void SetVideoParm(int ch,fs_new_conf_t fs_conf,encoder_new_conf_t  encoder_conf)
	{
		if(ch >= (int)m_vecVProc.size())
		{
			return ;
		}
		m_vecVProc[ch].SetVideoParm(fs_conf,encoder_conf);

	}

	int GetVideoNum()
	{
		return (int)m_vecVProc.size();
	}

	CVideoProc_1ch* GetVideoProc(int ch)
	{
		return &m_vecVProc[ch];
	}
protected:
	vector<CVideoProc_1ch> m_vecVProc;


};
#endif
